package circularity;

/**
 * This class represents a book that may have a single author.
 * 
 * This class participates in a one-to-one relationship with
 * AuthorCirc:
 *   BookCirc <1----1> AuthorCirc
 *   
 * @author Sachin Venugopalan
 * @since 27 February, 2012
 */
public class BookCirc {
	
	private String name;
	private int yearOfPub;
	private AuthorCirc author;
	
	public BookCirc(String name, int yearOfPub){
		this.name = name;
		this.yearOfPub = yearOfPub;
	}
	
	public String getName(){
		return this.name;
	}

	public int getYearOfPub(){
		return this.yearOfPub;
	}
	
	public AuthorCirc getAuthor(){
		return author;
	}

	public void setAuthor(AuthorCirc author){
		this.author = author;
	}
	
}
